﻿<agc:PopupUserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:silverlighContrib="clr-namespace:SilverlightContrib.Controls"
    xmlns:ge="clr-namespace:AgFractal.Controls.GradientEditor"
    xmlns:agc="clr-namespace:AgFractal.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    x:Class="AgFractal.Controls.GradientEditor.GradientEditor"        
    HorizontalAlignment="Left" VerticalAlignment="Top"
    mc:Ignorable="d"
    >
    <Grid Background="White" x:Name="LayoutRoot">
        <Grid Background="#FF111111" Margin="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" MinWidth="200" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock Text="Gradient editor" HorizontalAlignment="Center" Foreground="#FFAAAAAA" Grid.ColumnSpan="2" Margin="0,2"/>
            <silverlighContrib:ColorPicker x:Name="cp1" SelectedColorChanging="ColorChanged" Grid.Column="1" Grid.Row="1" Margin="6,0,12,0"/>
            <Grid x:Name="gradientGrid" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Margin="6,0,0,0" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Image x:Name="img" Margin="8,0,9,1" Width="400" Height="150" 
                       MouseLeftButtonDown="img_MouseLeftButtonDown" 
                       HorizontalAlignment="Center" 
                       VerticalAlignment="Center" 
                       Stretch="None"/>
                <StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="8,6,0,6">
                    <Button Content="Reverse" Width="75" Click="ReverseClick" Style="{StaticResource BlackGlossyButton}"/>
                    <Button x:Name="deleteBtn" Content="Delete"  Width="75" Margin="10,0,0,0" Click="deleteClick" Style="{StaticResource BlackGlossyButton}"/>
                </StackPanel>
            </Grid>
            <StackPanel Margin="4,6" Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Grid.ColumnSpan="2" d:LayoutOverrides="GridBox">
                <Button x:Name="OKButton" Content="OK" Width="75" Click="OKButton_Click" Style="{StaticResource BlackGlossyButton}"/>
                <Button x:Name="CancelButton" Content="Cancel"  Width="75" Margin="10,0,0,0" Click="CancelButton_Click" Style="{StaticResource BlackGlossyButton}"/>
            </StackPanel>
        </Grid>
    </Grid>
</agc:PopupUserControl>